import 'package:flutterone/page/category/Model/json_info_entity.dart';

class HomeRequset {

  static Future<List<JsonInfoEntity>> requsetMovieList (int start) async{
    //发送网络请求
    final jsonInfo = [
      {
        "nickname": "coderwhy",
        "level": 18,
        "courses": ["语文", "数学", "英语","语文", "数学", "英语","语文", "数学", "英语"],
        "register_date": "2222-2-22",
        "computer": {"brand": "MackBook", "price": 1000},
        "imageName":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.syfabiao.com%2Fzb_users%2Fupload%2F2022%2F03%2F20220316014009164736600962357.jpg&refer=http%3A%2F%2Fimg.syfabiao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1674982229&t=495f6aee1b8590e7b55b7e8970752ad9",
      },
      {
        "nickname": "name",
        "level": 18,
        "courses": ["语文", "数学", "英语"],
        "register_date": "2222-2-22",
        "computer": {"brand": "MackBook", "price": 1000},
        "imageName":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.dtstatic.com%2Fuploads%2Fblog%2F202108%2F04%2F20210804120940_8b989.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.dtstatic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1673765688&t=6e24bc11b34296883db8cc2043d156a0",
      },
      {
        "nickname": "kkkdiiid",
        "level": 18,
        "courses": ["语文", "数学", "英语"],
        "register_date": "2222-2-22",
        "computer": {"brand": "MackBook", "price": 1000},
        "imageName":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Flmg.jj20.com%2Fup%2Fallimg%2F4k%2Fs%2F01%2F2109241611215Z3-0-lp.jpg&refer=http%3A%2F%2Flmg.jj20.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1673766155&t=4e6bd40e8902a6a111c3ada3083d6759",
      },
    ];

    //构建url
    // final movieURL = "get";
    // var result = await HttpRequest.request(movieURL);
    final List<JsonInfoEntity> jsonInfoEntity = [];
    for (var sub in jsonInfo) {
      jsonInfoEntity.add(JsonInfoEntity.fromJson(sub));
    }
    return jsonInfoEntity;
  }
}